﻿using SqlSugar;

namespace Shop.Model.Entity.Goo;

/// <summary>
/// 2.1 商品表
/// </summary>
[SugarTable("goods_goods")]
public class GoodsGoods:BaseEntity
{
    /// <summary>
    /// 商品名称
    /// </summary>
    public string Name { get; set; }
    
    /// <summary>
    /// 商品名称(维语）
    /// </summary>
    public string UighurName { get; set; }
    
    /// <summary>
    /// 标签
    /// </summary>
    public string Tag { get; set; }
    
    /// <summary>
    /// 标签(维语)
    /// </summary>
    public string UighurTag { get; set; }
    
    /// <summary>
    /// 副标题
    /// </summary>
    public string Subhead { get; set; }
    
    /// <summary>
    /// 副标题(维语)
    /// </summary>
    public string UighurSubhead { get; set; }
    
    /// <summary>
    /// 封面图
    /// </summary>
    public string Cover { get; set; }
    
    /// <summary>
    /// 封面图(维语)
    /// </summary>
    public string UighurCover { get; set; }
    
    /// <summary>
    /// 轮播图
    /// </summary>
    public string Banner { get; set; }
    
    /// <summary>
    /// 轮播图(维语)
    /// </summary>
    public string UighurBanner { get; set; }
    
    /// <summary>
    /// 详情图
    /// </summary>
    public string Details { get; set; }
    
    /// <summary>
    /// 详情图(维语)
    /// </summary>
    public string UighurDetails { get; set; }
    
    /// <summary>
    /// 划线价
    /// </summary>
    public decimal LineationPrice { get; set; }
    
    /// <summary>
    /// 是否可以销售(默认为true)
    /// </summary>
    public bool Saleable { get; set; }
    
    /// <summary>
    /// 是否有效，0 =无效,1=有效 
    /// </summary>
    public bool Valid { get; set; }
    
    /// <summary>
    /// 规格数据(json对象)
    /// </summary>
    public string Spc { get; set; }
    
    /// <summary>
    /// 规格数据(json对象)(维语)
    /// </summary>
    public string UighurSpc { get; set; }
    
    /// <summary>
    /// 上架时间
    /// </summary>
    public DateTime? UpTime { get; set; }
    
    /// <summary>
    /// 下架时间
    /// </summary>
    public DateTime? DownTime { get; set; }
    
    /// <summary>
    /// 商品类型
    /// 1：单品
    /// 2：礼包
    /// </summary>
    public int Type { get; set; }

    /// <summary>
    /// 是否包邮
    /// </summary>
    public bool IsPostage { get; set; }
    
    /// <summary>
    /// 虚拟销量
    /// </summary>
    public int SalesVolume { get; set; }

    /// <summary>
    /// 评论数量
    /// </summary>
    public int CommentsCount { get; set; }  

    /// <summary>
    /// 创建时间
    /// </summary>
    [SugarColumn(IsOnlyIgnoreInsert = true)]
    public DateTime FoundTime { get; set; }
    
    /// <summary>
    /// 商品规格集合
    /// </summary>
    [Navigate(NavigateType.OneToMany, nameof(GoodsSize.GoodsId))]
    public List<GoodsSize> Size { get; set; }
    
    /// <summary>
    /// 模板(goods_delivery_temp.Id)
    /// </summary>
    public long DeliveryTemp { get; set; }
}